package top.riske.gen3d.controller;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.riske.gen3d.entity.Hunyuan3DFile;
import top.riske.gen3d.http.response.Result;
import top.riske.gen3d.service.Hunyuan3DFileService;

import java.util.List;

@RestController
@RequestMapping("/api")
public class File3DController {

    @Resource
    private Hunyuan3DFileService hunyuan3DFileService;

    /**
     * 获取所有预览模型图片
     */
    @GetMapping("/public/model/preview/list")
    public Result<List<Hunyuan3DFile>> listPreviewModelImage(HttpServletRequest request){
        // todo 分页处理
        return Result.success(hunyuan3DFileService.listPreviewModelImage(request));
    }

}
